/* eslint-disable no-param-reassign */
/* eslint-disable no-restricted-syntax */
/*
 * @Author: 李景福|1779062242@qq.com(lijingfu)
 * @Date: 2022-03-19 21:25:54
 * @LastEditors: 李景福|1779062242@qq.com(lijingfu)
 * @LastEditTime: 2022-04-16 17:28:02
 * @Administrator: 李景福|1779062242@qq.com(lijingfu)
 * @Copyright: 文件版本号
 */

'use strict';

const { Controller } = require('egg');

class AlarmallController extends Controller {
  async getAlarmAll() {
    const { ctx, service } = this;
    const { start, end } = ctx.request.body;
    const startUinx = this.ctx.app.utils.date.transformDate(start);
    const endUnix = this.ctx.app.utils.date.transformDate(end);
    const list = await service.alarmAll.getAlarmAll(startUinx, endUnix);
    ctx.success({ list });
  }
}

module.exports = AlarmallController;
